package entity;

import java.sql.Date;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.OneToMany;

@Entity
@DiscriminatorValue("Owner")
public class Owner extends Person {
    @OneToMany(mappedBy = "Owner")
    private List<Pet> pets = new ArrayList<>();

    public Owner() {
        super();
    }

    public Owner(String name, String lastname, String SSN, Date birthday) {
        super(name, lastname, SSN, birthday);
    }

    public void setPets(List<Pet> pets) {
        this.pets = pets;
    }

    public List<Pet> getPets() {
        return pets;
    }

}
